package com.stylefeng.guns.common.persistence.model;

import java.io.Serializable;

import com.baomidou.mybatisplus.enums.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author ruiyifeng123
 * @since 2018-05-08
 */
@TableName("wz_user")
public class WzUser extends Model<WzUser> {

    private static final long serialVersionUID = 1L;

    /**
     * 用户id
     */
    @TableId(value = "user_id", type = IdType.AUTO)
    private Long userId;
    /**
     * 用户编号
     */
    @TableField("user_code")
    private Long userCode;
    /**
     * 账号（手机号码）
     */
    private String account;
    /**
     * 密码MD5(密码+盐)
     */
    private String password;
    /**
     * 账户余额（分）
     */
    private Integer balance;
    /**
     * 现金余额
     */
    @TableField("cash_balance")
    private Integer cashBalance;
    /**
     * 奖金余额
     */
    @TableField("reward_balance")
    private Integer rewardBalance;
    /**
     * 总收益
     */
    private Integer profit;
    /**
     * 昵称
     */
    @TableField("nick_name")
    private String nickName;
    /**
     * 头像链接
     */
    @TableField("avatar_url")
    private String avatarUrl;
    /**
     * 角色：1-用户；2-实名用户;3-商户；
     */
    private Integer role;
    /**
     * 经度
     */
    private String longitude;
    /**
     * 维度
     */
    private String latitude;
    /**
     * 省
     */
    private String province;
    /**
     * 市
     */
    private String city;
    /**
     * 区
     */
    private String district;
    /**
     * 性别：0-默认；1-男；2-女
     */
    private Integer gender;
    /**
     * 城市ad_code
     */
    @TableField("ad_code")
    private String adCode;
    /**
     * 出生日期
     */
    private String birthday;
    /**
     * 状态：1-正常；2-实名认证中；3-实名认证驳回；4-实名认证通过；5-商户认证中；6-商户认证驳回；7-商户认证通过；
     */
    private Integer status;
    /**
     * 登录信息
     */
    @TableField("login_info")
    private String loginInfo;
    /**
     * 短效token
     */
    @TableField("access_token")
    private String accessToken;
    /**
     * 长效token
     */
    @TableField("refresh_token")
    private String refreshToken;
    /**
     * 更新时间
     */
    @TableField("update_time")
    private Date updateTime;


    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getUserCode() {
        return userCode;
    }

    public void setUserCode(Long userCode) {
        this.userCode = userCode;
    }

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Integer getBalance() {
        return balance;
    }

    public void setBalance(Integer balance) {
        this.balance = balance;
    }

    public Integer getCashBalance() {
        return cashBalance;
    }

    public void setCashBalance(Integer cashBalance) {
        this.cashBalance = cashBalance;
    }

    public Integer getRewardBalance() {
        return rewardBalance;
    }

    public void setRewardBalance(Integer rewardBalance) {
        this.rewardBalance = rewardBalance;
    }

    public Integer getProfit() {
        return profit;
    }

    public void setProfit(Integer profit) {
        this.profit = profit;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getAvatarUrl() {
        return avatarUrl;
    }

    public void setAvatarUrl(String avatarUrl) {
        this.avatarUrl = avatarUrl;
    }

    public Integer getRole() {
        return role;
    }

    public void setRole(Integer role) {
        this.role = role;
    }

    public String getLongitude() {
        return longitude;
    }

    public void setLongitude(String longitude) {
        this.longitude = longitude;
    }

    public String getLatitude() {
        return latitude;
    }

    public void setLatitude(String latitude) {
        this.latitude = latitude;
    }

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getDistrict() {
        return district;
    }

    public void setDistrict(String district) {
        this.district = district;
    }

    public Integer getGender() {
        return gender;
    }

    public void setGender(Integer gender) {
        this.gender = gender;
    }

    public String getAdCode() {
        return adCode;
    }

    public void setAdCode(String adCode) {
        this.adCode = adCode;
    }

    public String getBirthday() {
        return birthday;
    }

    public void setBirthday(String birthday) {
        this.birthday = birthday;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getLoginInfo() {
        return loginInfo;
    }

    public void setLoginInfo(String loginInfo) {
        this.loginInfo = loginInfo;
    }

    public String getAccessToken() {
        return accessToken;
    }

    public void setAccessToken(String accessToken) {
        this.accessToken = accessToken;
    }

    public String getRefreshToken() {
        return refreshToken;
    }

    public void setRefreshToken(String refreshToken) {
        this.refreshToken = refreshToken;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    protected Serializable pkVal() {
        return this.userId;
    }

    @Override
    public String toString() {
        return "WzUser{" +
        "userId=" + userId +
        ", userCode=" + userCode +
        ", account=" + account +
        ", password=" + password +
        ", balance=" + balance +
        ", cashBalance=" + cashBalance +
        ", rewardBalance=" + rewardBalance +
        ", profit=" + profit +
        ", nickName=" + nickName +
        ", avatarUrl=" + avatarUrl +
        ", role=" + role +
        ", longitude=" + longitude +
        ", latitude=" + latitude +
        ", province=" + province +
        ", city=" + city +
        ", district=" + district +
        ", gender=" + gender +
        ", adCode=" + adCode +
        ", birthday=" + birthday +
        ", status=" + status +
        ", loginInfo=" + loginInfo +
        ", accessToken=" + accessToken +
        ", refreshToken=" + refreshToken +
        ", updateTime=" + updateTime +
        "}";
    }
}
